<?php

/**
 * Configuration form base class.
 *
 * @package    form
 * @subpackage configuration
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseConfigurationForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'eje_x'            => new sfWidgetFormInput(),
      'eje_y'            => new sfWidgetFormInput(),
      'step'             => new sfWidgetFormInput(),
      'background_color' => new sfWidgetFormInput(),
      'function_color'   => new sfWidgetFormInput(),
      'created_at'       => new sfWidgetFormDateTime(),
      'updated_at'       => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorPropelChoice(array('model' => 'Configuration', 'column' => 'id', 'required' => false)),
      'eje_x'            => new sfValidatorNumber(),
      'eje_y'            => new sfValidatorNumber(),
      'step'             => new sfValidatorNumber(),
      'background_color' => new sfValidatorString(array('max_length' => 10)),
      'function_color'   => new sfValidatorString(array('max_length' => 10)),
      'created_at'       => new sfValidatorDateTime(),
      'updated_at'       => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('configuration[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Configuration';
  }


}
